//
//  RVFlightOrderListCell.swift
//  AirTravel
//
//  Created by tulip on 2021/9/6.
//

import UIKit

class RVFlightOrderListCell: UITableViewCell {

    @IBOutlet weak var price: UILabel!
    @IBOutlet weak var t_address: UILabel!
    @IBOutlet weak var time: UILabel!
    @IBOutlet weak var status: UILabel!
    @IBOutlet weak var title: UILabel!
    @IBOutlet weak var box: UIView!
    override func awakeFromNib() {
        super.awakeFromNib()
        box.layer.cornerRadius=6
        box.layer.masksToBounds=true
    }

    func bind(flight: RVFlightOrderList){
        
        title.text = flight.departCityName + flight.departAirport + "-" + flight.arriveCityName + flight.arriveAirport
        status.text = flight.statusName
        time.text = flight.departDate + " " + flight.departTime + "至" + flight.arriveDate + " " + flight.arriveTime
        t_address.text = flight.flightNo + "/" + flight.departAirport + flight.departTerminal + "航空楼出发"
        price.text = flight.money
        
    }
    
    
    func bind(railway: RVRailwayOrderList){
        
        title.text = railway.fromStationName + "-" + railway.toStationName
        status.text = railway.statusName
        time.text = railway.departDate + " " + railway.departTime + "至" + railway.arriveDate + " " + railway.arriveTime
        t_address.text = railway.trainNo + " " + railway.order_passenger[0].carriageNo + "车" + railway.order_passenger[0].seatNo
        price.text = railway.orderAmount
        
    }
}
